/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       score_dialog.h

	$Header: /game/dialog_score.h $

	$NoKeywords: $

 ************************************************************************/
#ifndef SCORE_DIALOG_H_INCLUDED
#define SCORE_DIALOG_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#pragma warning( disable: 4786 )

#include <vector>
#include "adventure_map.h"
#include "bitmap_group_ptr.h"
#include "bitmap_layer_window.h"
#include "creature_stack_ptr.h"
#include "dialog_box.h"
#include "material_array.h"
#include "score_computer.h"
#include "text_window_ptr.h"


class t_text_edit_window;


// ---------------------------------------------------------------------
// combat_results creatures dialog
// ---------------------------------------------------------------------
class t_score_dialog : public t_bitmap_layer_window
{
public:
	t_score_dialog(	t_window* parent, t_adventure_map const & map, int winner_team ); 

protected:
	t_text_window* add_text( std::string const& text, std::string const& layer_name, 
		                     int size, bool size_explicit = false, bool center = true );
	void			create_buttons();
	void			create_icons();
	void			create_text();
	void			initialize();
	void			ok_clicked( t_button* button );
	void			name_change( t_text_edit_window* );
	void			name_finished( t_text_edit_window* );
		                       
	t_counted_ptr<t_text_edit_window>	m_edit_box;
	t_bitmap_group_ptr					m_layout;
	t_bitmap_group_ptr					m_difficulty_icons;
	t_adventure_map const &				m_map;
	t_window*							m_parent; 
	t_creature_stack_ptr 				m_portraits[2];
	t_final_scores						m_scores;
	int									m_winner_team;
};

#endif // SCORE_DIALOG_H_INCLUDED